Add support for prepared statements (issue #75)#292
Open
nicolas-geysse wants to merge 1456 commits intocwida:mainfrom
Open
Add support for prepared statements (issue #75)#292nicolas-geysse wants to merge 1456 commits intocwida:mainfrom
nicolas-geysse wants to merge 1456 commits intocwida:mainfrom
Conversation
…on-weakly-connected-component Rework WCC implementation
…when-match-used-in-subquery Fix segmentation fault when match was used inside subquery
[still fixing some issues with aliases]
…with duckdb behaviour
…for-get_csr_v-and-get_csr_e Fix segmentation faults in csr v and e functions
…e function itself
Improve template bootstraper script
Update v1.3.2
This reverts commit b1edaff.
Merge with v1.4.1
Fix issues related to v1.4.1 release
Format fix
- Add handlers for PREPARE_STATEMENT and EXECUTE_STATEMENT in duckpgq_parser.cpp - Fix std::move() issues in summarize_property_graph.cpp for unique_ptr returns - Add test file for prepared statements Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PREPARE_STATEMENTandEXECUTE_STATEMENTinduckpgq_parser.cppstd::move()issues insummarize_property_graph.cppfor unique_ptr returnstest/sql/prepared_statements.testFixes #75
Implementation Details
The fix involves adding a case in
duckpgq_handle_statement()that extracts the inner statement from aPrepareStatementand recursively processes it. This allows graph queries inside PREPARE to be properly transformed.For EXECUTE statements, we simply throw a binder exception to let DuckDB's core handle the execution of the prepared statement.
Test plan
GRAPH_TABLEquery🤖 Generated with Claude Code